<?php
$students = [
    [
        'name' => '张三',
        'score' => 90,
        'hobby' => ['足球', '篮球']
    ],
    [
        'name' => '李四',
        'score' => 89,
        'hobby' => ['音乐']
    ],
    [
        'name' => '李四',
        'score' => 89,
        'hobby' => []
    ]
];

$students[2]['hobby'];
//if (!empty($students[2]['hobby'])) { // 0 false '' []
//    print_r($students[2]['hobby']);
//} else {
//    echo '李四没有爱好';
//}

if (!empty($students[0]['hobby'][2])){
    echo $students[0]['hobby'][2];
} else {
    echo '没有';
}